<div class="hl-comm-input">
    <div class="hl-comm-avat"><img src="{$user.user_portrait|mac_default='static/images/touxiang.png'|mac_url_img}"/></div>
    <form class="hl-comm-form comment_form clearfix"  >
       <input type="hidden" name="comment_pid" value="0">
       <div class="hl-comm-write clearfix">
            <textarea class="hl-comm-content comment_content" name="comment_content" placeholder="文明发言，共建和谐社会"></textarea>
            <div class="hl-comm-handle clearfix">
                <a class="hl-comm-face hl-text-muted comment_face_panel" href="javascript:void(0)"><i class="iconfont hl-icon-biaoqing"></i></a>
                <div class="hl-comm-face-box hl-alert-box hl-bg-site hl-fadeIn comment_face_box">
                    {maccms:for start="1" end="16" }
                    <img data-id="{$i}" src="__STATIC__/images/face/{$i}.gif">
                    {/maccms:for}
                </div>
                <div class="hl-comm-remaining hl-text-muted">还可以输入<span class="comment_remaining" >200</span></div>
                <input class="hl-comm-submit hl-bg-conch comment_submit" type="button" value="发布">
                {if condition="$comment.verify eq 1"}
                <img class="hl-comm-code" src="{:mac_url('verify/index')}" data-role="{:mac_url('verify/index')}" title="看不清楚? 换一张！" onClick="this.src=this.src+'?v={:time()}'"/>
                <input class="hl-comm-verify hl-bg-subs" type="text" name="verify" placeholder="验证码">{/if}
            </div>
        </div>
    </form>
</div>
<div class="hl-comm-list">
    <ul class="clearfix">
        {maccms:comment num="'.$comment['pagesize'].'" paging="yes" half="3" order="desc" by="id"}
        <li class="hl-comm-each">
            <div class="hl-comm-avat"><img src="{$vo.user_id|mac_get_user_portrait}"/></div>
            <div class="hl-comm-head">
                <span class="hl-comm-name hl-text-site">{$vo.comment_name}</span>
                <span class="hl-comm-time hl-text-muted">{$vo.comment_time|mac_friend_date}</span>
            </div>
            <div class="hl-comm-cont">
                <div class="hl-comm-content hl-text-site">{$vo.comment_content|mac_em_replace}</div>
                <div class="hl-comm-action hl-text-muted clearfix">
                    <a class="digg_link" data-id="{$vo.comment_id}" data-mid="4" data-type="up" href="javascript:;"><i class="iconfont hl-icon-zanshang"></i><em class="digg_num">{$vo.comment_up}</em></a>
                    <a data-id="{$vo.comment_id}" data-mid="4" data-type="down" href="javascript:;" class="digg_link" ><i class="iconfont hl-icon-zanxia"></i><em class="digg_num">{$vo.comment_down}</em></a>
                    <a class="comment_reply" data-id="{$vo.comment_id}" href="javascript:;" >回复</a>
                    <a class="comment_report" data-id="{$vo.comment_id}" href="javascript:;">举报</a>	
                </div>
                {maccms:foreach name="$vo.sub" id="child"}
                <div class="hl-comm-reply hl-comm-ry-child">
                    <div class="hl-comm-avat"><img src="{$child.user_id|mac_get_user_portrait}"/></div>
                    <div class="hl-comm-cont">
                        <div class="hl-comm-content hl-text-site"><span class="hl-comm-name">{$child.comment_name}</span>：{$child.comment_content|mac_em_replace}&nbsp;&nbsp;<span class="hl-comm-time hl-text-muted">{$child.comment_time|mac_friend_date}</span></div>
                        <div class="hl-comm-action hl-text-muted clearfix">
                            <a data-id="{$child.comment_id}" data-mid="4" data-type="up" href="javascript:;" class="digg_link" ><i class="iconfont hl-icon-zanshang"></i><em class="digg_num">{$child.comment_up}</em></a>
                            <a class="digg_link" data-id="{$child.comment_id}" data-mid="4" data-type="down" href="javascript:;"><i class="iconfont hl-icon-zanxia"></i><em class="digg_num">{$child.comment_down}</em></a>
                            <a data-id="{$child.comment_id}" href="javascript:;" class="comment_report_child">举报</a>
                        </div>
                    </div>
                </div>
                {/maccms:foreach}
            </div>
        </li>
        {/maccms:comment}
    </ul>
    {empty name="$__PAGING__.record_total"}
    <div class="hl-empty-wrap hl-text-center hl-col-xs-12">
        <i class="iconfont hl-icon-wupinglun"></i><p>当前暂无评论，赶紧抢个沙发</p>
    </div>
    {/empty}
</div>

{if$__PAGING__.page_total>1}
<ul class="hl-page-wrap hl-text-center cleafix">
	<li class="hl-hide-sm"><a href="javascript:void(0);" onclick="MAC.Comment.Show(1)" title="首页"{if$__PAGING__['page_current']==1} class="hl-disad"{/if}><i class="iconfont hl-icon-jiantoushou"></i></a></li>
	<li><a href="javascript:void(0);" onclick="MAC.Comment.Show('{$__PAGING__.page_prev}')" title="上一页"{if$__PAGING__['page_current']==1} class="hl-disad"{/if}><span class="hl-hide-sm"><i class="iconfont hl-icon-jiantouzuo"></i></span><span class="hl-hidden-xs">上一页</span></a></li>
    {if$__PAGING__.page_current>3}
	<li class="hl-hidden-xs"><a href="javascript:void(0)" onclick="MAC.Comment.Show('1')"{if$__PAGING__['page_current']==1} class="hl-disad"{/if}>1</a></li>
	<li class="hl-hidden-xs hl-disad"><a class="hl-page-dot" href="javascript:;"><span>...</span></a></li>
	{/if}
	{maccms:foreach name="$__PAGING__.page_num" id="num"}
	<li class="hl-hidden-xs {if condition="$__PAGING__['page_current'] eq $num"}active{/if}">
	    {if condition="$__PAGING__['page_current'] eq $num"}
        <a class="page_link page_current" href="javascript:;" title="第{$num}页">{$num}</a>
        {else}
        <a class="page_link" href="javascript:void(0)" onclick="MAC.Comment.Show('{$num}')" title="第{$num}页">{$num}</a>
        {/if}
    </li>
	{/maccms:foreach}
    {if$__PAGING__.page_current<($__PAGING__.page_total-2)}
	<li class="hl-hidden-xs hl-disad"><a class="hl-page-dot" href="javascript:;"><span>...</span></a></li>
	<li class="hl-hidden-xs"><a href="javascript:void(0)" onclick="MAC.Comment.Show('{$__PAGING__.page_total}')"{if$__PAGING__['page_current']==$__PAGING__.page_total} class="hl-disad"{/if}>{$__PAGING__.page_total}</a></li>
	{/if}
	<li class="hl-page-tips hl-hide-sm active"><a href="javascript:;">{$__PAGING__.page_current}&nbsp;/&nbsp;{$__PAGING__.page_total}</a></li>
	<li><a href="javascript:void(0)" onclick="MAC.Comment.Show('{$__PAGING__.page_next}')" title="下一页"{if$__PAGING__['page_current']==$__PAGING__.page_total} class="hl-disad"{/if}><span class="hl-hide-sm"><i class="iconfont hl-icon-jiantouyou"></i></span><span class="hl-hidden-xs">下一页</span></a></li>
	<li class="hl-hide-sm"><a href="javascript:void(0)" onclick="MAC.Comment.Show('{$__PAGING__.page_total}')" title="尾页"{if$__PAGING__['page_current']==$__PAGING__.page_total} class="hl-disad"{/if}><i class="iconfont hl-icon-jiantouwei"></i></a></li>
</ul>{/if}
<script type="text/javascript">
    var $input = $(".hl-comm-input .hl-comm-content"),
        $wrap = $(".hl-comm-input .hl-comm-write");
	$input.focus(function(){
		$wrap.addClass("hl-comm-start").addClass("hl-comm-focus");	
	});
    $input.blur(function(){
		$wrap.removeClass("hl-comm-focus");	
	});
</script>
<script type="text/javascript">
    $('.hl-total').html('{$__PAGING__.record_total}');
</script>